import CommonApi from './common'

// 巡查内容
class ApprovalFlowApi extends CommonApi {
    constructor() {
        super()
        this.scope = 'approvalFlow'
    }
    resolvePath(path) {
        return this.scope + path
    }
    // 批复
    approve(data) {
        const path = this.resolvePath('/approve')
        return this.post(path, data)
    }
    // 审核
    async audit(data) {
        const path = this.resolvePath('/review')
        return this.post(path, data)
    }

    // 审批进度
    getApprovalDetail(data) {
        const path = this.resolvePath('/detailsByNumber')
        return this.post(path, data)
    }
}

export default ApprovalFlowApi
